import React from 'react';
import { Component } from 'react';
import ShopItem from './shopItem/ShopItem.jsx';
import { Link } from 'react-router';
//Url
import { url } from 'root_path/util/url.js';
require('./ShopList.less');

export default class ShopList extends Component {
    constructor() {
        super();
    }
  render() {
    const shops = [
      {name:"黄焖鸡", logoSrc:"2.png", userScore: 5.0},
      {name:"盖浇饭", logoSrc:"2.png", userScore: 2.5},
      {name:"元宵", logoSrc:"2.png", userScore: 1.5},
      {name:"水饺", logoSrc:"2.png", userScore: 4.5},
      {name:"蛋炒饭", logoSrc:"2.png", userScore: 4.9},
      {name:"美亦粥", logoSrc:"2.png", userScore: 2.5},
      {name:"凉皮", logoSrc:"2.png", userScore: 4.5},
      {name:"肯德基", logoSrc:"2.png", userScore: 1.5}
    ];
    return (
	    <div className="shopList-container">
        {
          shops.map((item, index)=>{
            return  <Link to={url.shop} key={index}>
                      <ShopItem index={index} shop={item}/>
                    </Link>
          })
        }
      </div>
    )
  }
};